<template>
	<view class="idnex-content">
	<!-- 	<view>
			<monitor-scan-code @resultCode="resultCode" />
		</view> -->
		<page-top :title="'条码报工'"></page-top>

		<u-divider :hairline="false" textColor="#000000" text="生产报工" textPosition="left"></u-divider>
		<view class="menu">

			<u-row v-for="(item21,index21) in cartObj" :key="index21">
				<u-col span="4" v-for="(item22,index22) in item21" :key="index22">
					<view class="layout" @click="clickUrlEv(item22.url)">
						<view class="itm">
							<view class="img">
								<u--image :showLoading="true" :src="item22.image" width="100rpx" height="100rpx">
								</u--image>
							</view>
							<view class="title">
								<text>{{item22.title}}</text>
							</view>
						</view>
					</view>
				</u-col>
			</u-row>
		</view>


	</view>
</template>

<script>
	// import monitorScanCode from '@/components/scan/monitorScanCode.vue';
	import {
		LoginApiPost,
		LoginRefreshTokenApiPost
	} from '@/common/api/login.js';

	import pageTop from '@/components/pageTop.vue';
	export default {
		components: {
			// monitorScanCode: monitorScanCode
			pageTop: pageTop
		},
		data() {
			return {
				cartObj: [
					[{
						title: '生产日报表',
						image: '/static/image/base01.png',
						url: '/pages/wr/index'
					}],
				],
			}
		},
		async onReady() {

		},
		onShow() {
			if (uni.getStorageSync('token') == '') {
				uni.showModal({

					content: '您没没登录',
					showCancel: false,
					success: function(res) {
						if (res.confirm) {
							uni.reLaunch({
								url: '/pages/login/login'
							});
						} else if (res.cancel) {

						}
					}
				});
			}
		},
		methods: {
			clickUrlEv(url) {
				uni.navigateTo({
					url: url
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}



	.idnex-content {
		background-color: #ffffff;
		height: 100%;
	}

	.layout {
		text-align: center;

		.img {
			display: flex;
			align-items: center;
			justify-content: center;
		}

		.title {
			font-size: 25rpx;
		}
	}

	.u-divider {
		margin: 0 !important;
		padding-top: 15rpx;
		padding-bottom: 15rpx;
	}

	.layout:active {
		background-color: var(--common-active);
	}

	.menu .u-row .u-col {
		padding-bottom: 20rpx;
		box-sizing: border-box;
	}
</style>